function onRequest (request, response, modules) {

  //获取数据库对象
  var db = modules.oData;
  //这里放到表里的ID
  var objectId = 'Uv9OLLLN';

  //http请求方式: GET
  var appid = 'wxebxxxx';
  var secret = 'xxxxx';
  var url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' + appid + '&secret=' + secret;
  //获取Http模块
  var http = modules.oHttp;
  //发起Get请求
  http(url, function (error, res, body) {
    if (!error && res.statusCode == 200) {
      //写入数据库
      var resultObject = JSON.parse(body);
      //如果返回错误则打印
      if(resultObject.errcode){
        response.send(resultObject);
      }

      db.update({
        "table": "WeiXin_access_token",
        "objectId": objectId,
        "data": { "access_token": resultObject.access_token }
      }, function (err, data) {
        response.send("success"+data);
      });

    }
  });
  //获取微信access_token END


}  